﻿using eBay.Service.Core.Soap;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace eBayAPIEntities
{

    /// <summary>
    /// The item to be added to ebay site.
    /// Detail infomation see: http://developer.ebay.com/devzone/xml/docs/reference/ebay/additem.html
    /// </summary>
    public class Item
    {
        /// <summary>
        /// the id of an item, return after post success.
        /// e.g:110120542583
        /// </summary>
        public string ItemId { get; set; }

        public string Title { get; set; }

        public string Description { get; set; }

        /// <summary>
        /// the start price of this item
        /// </summary>
        public decimal StartPrice { get; set; }

        /// <summary>
        /// We consistently use the same IDs for similar condition qualities (across all sites and categories). 
        /// For example, 1000 is always used for brand new items in their original retail packaging (or equivalent).
        /// The display names and the subset of supported conditions can vary in different categories (see Condition Display Names by Category).
        /// See: http://developer.ebay.com/DevZone/finding/CallRef/Enums/conditionIdList.html for more detail infomation.
        /// </summary>
        public ConditionEnum ConditionID { get; set; }

        /// <summary>
        /// The ID for a category in which you list an item can change.
        /// When you list an item, you can use the Item.CategoryMappingAllowed flag to allow eBay to handle the cases
        /// in which the primary or secondary category ID specified in the request is no longer valid.
        /// When set to true, this flag allows eBay to check whether you are passing in old category IDs
        /// and if you are, to map them to corresponding active IDs (if any exist)
        /// See http://developer.ebay.com/DevZone/XML/docs/WebHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?context=eBay_XML_API&topic=CategoryMapping for more detail
        /// </summary>
        public bool CategoryMappingAllowed { get; set; }

        /// <summary>
        /// Defines the 2-letter country code set. 
        /// Definition see:http://developer.ebay.com/devzone/xml/docs/reference/ebay/types/CountryCodeType.html
        /// </summary>
        public CountryCodeType Country { get; set; }

        /// <summary>
        /// Currency associated with the item's price information. 
        /// 3-letter ISO 4217 currency code that corresponds to the site specified in the listing request.
        /// Definition see: http://developer.ebay.com/devzone/xml/docs/reference/ebay/types/CurrencyCodeType.html
        /// </summary>
        public CurrencyCodeType Currency { get; set; }

        /// <summary>
        /// Specifies the maximum number of business days the seller commits to for preparing an item to be shipped after receiving a cleared payment.
        /// This time does not include the shipping time (the carrier's transit time).
        /// Typical values are 0, 1, 2, 3, 4, 5, 10, 15, or 20,but this can vary by site and these may change over time.
        /// </summary>
        public int DispatchTimeMax { get; set; }

        public string ListingDuration { get; set; }
    }
}
